Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 4 - Geometric Objects


Summary of Geometric Objects

C Summary

Constants

#define kQ3NURBCurveMaxOrder     16 /*maximum order for NURB curves*/
#define kQ3NURBPatchMaxOrder     11 /*maximum order for NURB patches*/
#define kQ3GeometryTypeBox             Q3_OBJECT_TYPE('b','o','x',' ')
#define kQ3GeometryTypeGeneralPolygon  Q3_OBJECT_TYPE('g','p','g','n')
#define kQ3GeometryTypeLine            Q3_OBJECT_TYPE('l','i','n','e')
#define kQ3GeometryTypeMarker          Q3_OBJECT_TYPE('m','r','k','r')
#define kQ3GeometryTypeMesh            Q3_OBJECT_TYPE('m','e','s','h')
#define kQ3GeometryTypeNURBCurve       Q3_OBJECT_TYPE('n','r','b','c')
#define kQ3GeometryTypeNURBPatch       Q3_OBJECT_TYPE('n','r','b','p')
#define kQ3GeometryTypePoint           Q3_OBJECT_TYPE('p','n','t',' ')
#define kQ3GeometryTypePolygon         Q3_OBJECT_TYPE('p','l','y','g')
#define kQ3GeometryTypePolyLine        Q3_OBJECT_TYPE('p','l','y','l')
#define kQ3GeometryTypeTriangle        Q3_OBJECT_TYPE('t','r','n','g')
#define kQ3GeometryTypeTriGrid         Q3_OBJECT_TYPE('t','r','i','g')
typedef enum TQ3PixelType {
   kQ3PixelTypeRGB32                   /*32 bits per pixel*/
} TQ3PixelType;
typedef enum TQ3Endian {
   kQ3EndianBig,
   kQ3EndianLittle
} TQ3Endian;
typedef enum TQ3GeneralPolygonShapeHint {
   kQ3GeneralPolygonShapeHintComplex,
   kQ3GeneralPolygonShapeHintConcave,
   kQ3GeneralPolygonShapeHintConvex
} TQ3GeneralPolygonShapeHint;
typedef enum TQ3EndCapMasks {
   kQ3EndCapNone              = 0,
   kQ3EndCapMaskTop           = 1 << 0,
   kQ3EndCapMaskBottom        = 1 << 1
} TQ3EndCapMasks;

Data Types

typedef unsigned long                        TQ3EndCap;

Points

typedef struct TQ3Point2D {
   float       x;
   float       y;
} TQ3Point2D;
typedef struct TQ3Point3D {
   float       x;
   float       y;
   float       z;
} TQ3Point3D;

Rational Points

typedef struct TQ3RationalPoint3D {
   float       x;
   float       y;
   float       w;
} TQ3RationalPoint3D;
typedef struct TQ3RationalPoint4D {
   float       x;
   float       y;
   float       z;
   float       w;
} TQ3RationalPoint4D;

Polar and Spherical Points

typedef struct TQ3PolarPoint {
   float       r;
   float       theta;
} TQ3PolarPoint;
typedef struct TQ3SphericalPoint {
   float       rho;
   float       theta;
   float       phi;
} TQ3SphericalPoint;

Vectors

typedef struct TQ3Vector2D {
   float       x;
   float       y;
} TQ3Vector2D;
typedef struct TQ3Vector3D {
   float       x;
   float       y;
   float       z;
} TQ3Vector3D;

Quaternions

typedef struct TQ3Quaternion {
   float       w;
   float       x;
   float       y;
   float       z;
} TQ3Quaternion;

Rays

typedef struct TQ3Ray3D {
   TQ3Point3D                 origin;
   TQ3Vector3D                direction;
} TQ3Ray3D;

Parametric Points

typedef struct TQ3Param2D {
   float       u;
   float       v;
} TQ3Param2D;
typedef struct TQ3Param3D {
   float       u;
   float       v;
   float       w;
} TQ3Param3D;

Tangents

typedef struct TQ3Tangent2D {
   TQ3Vector3D                uTangent;
   TQ3Vector3D                vTangent;
} TQ3Tangent2D;
typedef struct TQ3Tangent3D {
   TQ3Vector3D                uTangent;
   TQ3Vector3D                vTangent;
   TQ3Vector3D                wTangent;
} TQ3Tangent3D;

Vertices

typedef struct TQ3Vertex3D {
   TQ3Point3D                 point;
   TQ3AttributeSet            attributeSet;
} TQ3Vertex3D;

Matrices

typedef struct TQ3Matrix3x3 {
   float                      value[3][3];
} TQ3Matrix3x3;
typedef struct TQ3Matrix4x4 {
   float                      value[4][4];
} TQ3Matrix4x4;

Bitmaps and Pixel Maps

typedef struct TQ3Bitmap {
   unsigned char              *image;
   unsigned long              width;
   unsigned long              height;
   unsigned long              rowBytes;
   TQ3Endian                  bitOrder;
} TQ3Bitmap;
typedef struct TQ3Pixmap {
   void                       *image;
   unsigned long              width;
   unsigned long              height;
   unsigned long              rowBytes;
   unsigned long              pixelSize;
   TQ3PixelType               pixelType;
   TQ3Endian                  bitOrder;
   TQ3Endian                  byteOrder;
} TQ3Pixmap;
typedef struct TQ3StoragePixmap {
   TQ3StorageObject           image;
   unsigned long              width;
   unsigned long              height;
   unsigned long              rowBytes;
   unsigned long              pixelSize;
   TQ3PixelType               pixelType;
   TQ3Endian                  bitOrder;
   TQ3Endian                  byteOrder;
} TQ3StoragePixmap;

Areas and Plane Equations

typedef struct TQ3Area {
   TQ3Point2D                 min;
   TQ3Point2D                 max;
} TQ3Area;
typedef struct TQ3PlaneEquation {
   TQ3Vector3D                normal;
   float                      constant;
} TQ3PlaneEquation;

Point Objects

typedef struct TQ3PointData {
   TQ3Point3D                 point;
   TQ3AttributeSet            pointAttributeSet;
} TQ3PointData;

Lines

typedef struct TQ3LineData {
   TQ3Vertex3D                vertices[2];
   TQ3AttributeSet            lineAttributeSet;
} TQ3LineData;

Polylines

typedef struct TQ3PolyLineData {
   unsigned long              numVertices;
   TQ3Vertex3D                *vertices;
   TQ3AttributeSet            *segmentAttributeSet;
   TQ3AttributeSet            polyLineAttributeSet;
} TQ3PolyLineData;

Triangles

typedef struct TQ3TriangleData {
   TQ3Vertex3D                vertices[3];
   TQ3AttributeSet            triangleAttributeSet;
} TQ3TriangleData;

Simple Polygons

typedef struct TQ3PolygonData {
   unsigned long              numVertices;
   TQ3Vertex3D                *vertices;
   TQ3AttributeSet            polygonAttributeSet;
} TQ3PolygonData;

General Polygons

typedef struct TQ3GeneralPolygonContourData {
   unsigned long              numVertices;
   TQ3Vertex3D                *vertices;
} TQ3GeneralPolygonContourData;
typedef struct TQ3GeneralPolygonData {
   unsigned long                 numContours;
   TQ3GeneralPolygonContourData  *contours;
   TQ3GeneralPolygonShapeHint    shapeHint;
   TQ3AttributeSet               generalPolygonAttributeSet;
} TQ3GeneralPolygonData;

Boxes

typedef struct TQ3BoxData {
   TQ3Point3D                 origin;
   TQ3Vector3D                orientation;
   TQ3Vector3D                majorAxis;
   TQ3Vector3D                minorAxis;
   TQ3AttributeSet            *faceAttributeSet;
   TQ3AttributeSet            boxAttributeSet;
} TQ3BoxData;

Trigrids

typedef struct TQ3TriGridData {
   unsigned long              numRows;
   unsigned long              numColumns;
   TQ3Vertex3D                *vertices;
   TQ3AttributeSet            *facetAttributeSet;
   TQ3AttributeSet            triGridAttributeSet;
} TQ3TriGridData;

Meshes

typedef struct TQ3MeshComponentPrivate       *TQ3MeshComponent;
typedef struct TQ3MeshVertexPrivate          *TQ3MeshVertex;
typedef struct TQ3MeshVertexPrivate          *TQ3MeshFace;
typedef struct TQ3MeshEdgeRepPrivate         *TQ3MeshEdge;
typedef struct TQ3MeshContourPrivate         *TQ3MeshContour;
typedef struct TQ3MeshIterator {
   void                       *var1;
   void                       *var2;
   void                       *var3;
   struct {
      void                    *field1;
      char                    field2[4];
   } var4;
} TQ3MeshIterator;

NURB Curves

typedef struct TQ3NURBCurveData {
   unsigned long              order;
   unsigned long              numPoints;
   TQ3RationalPoint4D         *controlPoints;
   float                      *knots;
   TQ3AttributeSet            curveAttributeSet;
} TQ3NURBCurveData;

NURB Patches

typedef struct TQ3NURBPatchData {
   unsigned long              uOrder;
   unsigned long              vOrder;
   unsigned long              numRows;
   unsigned long              numColumns;
   TQ3RationalPoint4D         *controlPoints;
   float                      *uKnots;
   float                      *vKnots;
   unsigned long              numTrimLoops;
   TQ3NURBPatchTrimLoopData   *trimLoops;
   TQ3AttributeSet            patchAttributeSet;
} TQ3NURBPatchData;
typedef struct TQ3NURBPatchTrimLoopData {
   unsigned long                       numTrimCurves;
   TQ3NURBPatchTrimCurveData           *trimCurves;
} TQ3NURBPatchTrimLoopData;
typedef struct TQ3NURBPatchTrimCurveData {
   unsigned long                       order;
   unsigned long                       numPoints;
   TQ3RationalPoint3D                  *controlPoints;
   float                               *knots;
} TQ3NURBPatchTrimCurveData;

Markers

typedef struct TQ3MarkerData {
   TQ3Point3D                 location;
   long                       xOffset;
   long                       yOffset;
   TQ3Bitmap                  bitmap;
   TQ3AttributeSet            markerAttributeSet;
} TQ3MarkerData;

Geometric Objects Routines

Managing Geometric Objects

TQ3ObjectType Q3Geometry_GetType (
TQ3GeometryObject geometry);
TQ3Status Q3Geometry_GetAttributeSet (
TQ3GeometryObject geometry, 
TQ3AttributeSet *attributeSet);
TQ3Status Q3Geometry_SetAttributeSet (
TQ3GeometryObject geometry, 
TQ3AttributeSet attributeSet);
TQ3Status Q3Geometry_Submit(TQ3GeometryObject geometry, 
TQ3ViewObject view);

Creating and Editing Points

TQ3GeometryObject Q3Point_New(const TQ3PointData *pointData);
TQ3Status Q3Point_Submit(const TQ3PointData *pointData, 
TQ3ViewObject view);
TQ3Status Q3Point_GetData(TQ3GeometryObject point, 
TQ3PointData *pointData);
TQ3Status Q3Point_SetData(TQ3GeometryObject point, 
const TQ3PointData *pointData);
TQ3Status Q3Point_EmptyData(TQ3PointData *pointData);
TQ3Status Q3Point_GetPosition(TQ3GeometryObject point, 
TQ3Point3D *position);
TQ3Status Q3Point_SetPosition(TQ3GeometryObject point, 
const TQ3Point3D *position);

Creating and Editing Lines

TQ3GeometryObject Q3Line_New(const TQ3LineData *lineData);
TQ3Status Q3Line_Submit(const TQ3LineData *lineData, 
TQ3ViewObject view);
TQ3Status Q3Line_GetData(TQ3GeometryObject line, 
TQ3LineData *lineData);
TQ3Status Q3Line_SetData(TQ3GeometryObject line, 
const TQ3LineData *lineData);
TQ3Status Q3Line_GetVertexPosition (
TQ3GeometryObject line, 
unsigned long index, 
TQ3Point3D *position);
TQ3Status Q3Line_SetVertexPosition (
TQ3GeometryObject line, 
unsigned long index, 
const TQ3Point3D *position);
TQ3Status Q3Line_GetVertexAttributeSet (
TQ3GeometryObject line, 
unsigned long index, 
TQ3AttributeSet *attributeSet);
TQ3Status Q3Line_SetVertexAttributeSet (
TQ3GeometryObject line,
unsigned long index,
TQ3AttributeSet attributeSet);
TQ3Status Q3Line_EmptyData(TQ3LineData *lineData);

Creating and Editing Polylines

TQ3GeometryObject Q3PolyLine_New (
const TQ3PolyLineData *polyLineData);
TQ3Status Q3PolyLine_Submit(const TQ3PolyLineData *polyLineData, 
TQ3ViewObject view);
TQ3Status Q3PolyLine_GetData(TQ3GeometryObject polyLine, 
TQ3PolyLineData *polyLineData);
TQ3Status Q3PolyLine_SetData(TQ3GeometryObject polyLine, 
const TQ3PolyLineData *polyLineData);
TQ3Status Q3PolyLine_EmptyData(TQ3PolyLineData *polyLineData);
TQ3Status Q3PolyLine_GetVertexPosition (
TQ3GeometryObject polyLine, 
unsigned long index, 
TQ3Point3D *position);
TQ3Status Q3PolyLine_SetVertexPosition (
TQ3GeometryObject polyLine, 
unsigned long index, 
const TQ3Point3D *position);
TQ3Status Q3PolyLine_GetVertexAttributeSet (
TQ3GeometryObject polyLine, 
unsigned long index, 
TQ3AttributeSet *attributeSet);
TQ3Status Q3PolyLine_SetVertexAttributeSet (
TQ3GeometryObject polyLine, 
unsigned long index, 
TQ3AttributeSet attributeSet);
TQ3Status Q3PolyLine_GetSegmentAttributeSet (
TQ3GeometryObject polyLine, 
unsigned long index, 
TQ3AttributeSet *attributeSet);
TQ3Status Q3PolyLine_SetSegmentAttributeSet (
TQ3GeometryObject polyLine, 
unsigned long index, 
TQ3AttributeSet attributeSet);

Creating and Editing Triangles

TQ3GeometryObject Q3Triangle_New (
const TQ3TriangleData *triangleData);
TQ3Status Q3Triangle_Submit(const TQ3TriangleData *triangleData, 
TQ3ViewObject view);
TQ3Status Q3Triangle_GetData(TQ3GeometryObject triangle, 
TQ3TriangleData *triangleData);
TQ3Status Q3Triangle_SetData(TQ3GeometryObject triangle, 
const TQ3TriangleData *triangleData);
TQ3Status Q3Triangle_EmptyData(TQ3TriangleData *triangleData);
TQ3Status Q3Triangle_GetVertexPosition (
TQ3GeometryObject triangle, 
unsigned long index, 
TQ3Point3D *point);
TQ3Status Q3Triangle_SetVertexPosition (
TQ3GeometryObject triangle, 
unsigned long index, 
const TQ3Point3D *point);
TQ3Status Q3Triangle_GetVertexAttributeSet (
TQ3GeometryObject triangle, 
unsigned long index, 
TQ3AttributeSet *attributeSet);
TQ3Status Q3Triangle_SetVertexAttributeSet (
TQ3GeometryObject triangle, 
unsigned long index, 
TQ3AttributeSet attributeSet);

Creating and Editing Simple Polygons

TQ3GeometryObject Q3Polygon_New (
const TQ3PolygonData *polygonData);
TQ3Status Q3Polygon_Submit(const TQ3PolygonData *polygonData, 
TQ3ViewObject view);
TQ3Status Q3Polygon_GetData(TQ3GeometryObject polygon, 
TQ3PolygonData *polygonData);
TQ3Status Q3Polygon_SetData(TQ3GeometryObject polygon, 
const TQ3PolygonData *polygonData);
TQ3Status Q3Polygon_EmptyData(TQ3PolygonData *polygonData);
TQ3Status Q3Polygon_GetVertexPosition (
TQ3GeometryObject polygon, 
unsigned long index, 
TQ3Point3D *point);
TQ3Status Q3Polygon_SetVertexPosition (
TQ3GeometryObject polygon, 
unsigned long index, 
const TQ3Point3D *point);
TQ3Status Q3Polygon_GetVertexAttributeSet (
TQ3GeometryObject polygon, 
unsigned long index, 
TQ3AttributeSet *attributeSet);
TQ3Status Q3Polygon_SetVertexAttributeSet (
TQ3GeometryObject polygon, 
unsigned long index, 
TQ3AttributeSet attributeSet);

Creating and Editing General Polygons

TQ3GeometryObject Q3GeneralPolygon_New (
const TQ3GeneralPolygonData *generalPolygonData);
TQ3Status Q3GeneralPolygon_Submit (
const TQ3GeneralPolygonData *generalPolygonData, 
TQ3ViewObject view);
TQ3Status Q3GeneralPolygon_GetData (
TQ3GeometryObject generalPolygon, 
TQ3GeneralPolygonData *generalPolygonData);
TQ3Status Q3GeneralPolygon_SetData (
TQ3GeometryObject generalPolygon, 
const TQ3GeneralPolygonData *generalPolygonData);
TQ3Status Q3GeneralPolygon_EmptyData (
TQ3GeneralPolygonData *generalPolygonData);
TQ3Status Q3GeneralPolygon_GetVertexPosition (
TQ3GeometryObject generalPolygon, 
unsigned long contourIndex, 
unsigned long pointIndex, 
TQ3Point3D *position);
TQ3Status Q3GeneralPolygon_SetVertexPosition (
TQ3GeometryObject generalPolygon, 
unsigned long contourIndex, 
unsigned long pointIndex, 
const TQ3Point3D *position);
TQ3Status Q3GeneralPolygon_GetVertexAttributeSet (
TQ3GeometryObject generalPolygon, 
unsigned long contourIndex, 
unsigned long pointIndex, 
TQ3AttributeSet *attributeSet);
TQ3Status Q3GeneralPolygon_SetVertexAttributeSet (
TQ3GeometryObject generalPolygon, 
unsigned long contourIndex, 
unsigned long pointIndex, 
TQ3AttributeSet attributeSet);
TQ3Status Q3GeneralPolygon_GetShapeHint (
TQ3GeometryObject generalPolygon, 
TQ3GeneralPolygonShapeHint *shapeHint);
TQ3Status Q3GeneralPolygon_SetShapeHint (
TQ3GeometryObject generalPolygon, 
TQ3GeneralPolygonShapeHint shapeHint);

Creating and Editing Boxes

TQ3GeometryObject Q3Box_New(const TQ3BoxData *boxData);
TQ3Status Q3Box_Submit(const TQ3BoxData *boxData, 
TQ3ViewObject view);
TQ3Status Q3Box_GetData(TQ3GeometryObject box, 
TQ3BoxData *boxData);
TQ3Status Q3Box_SetData(TQ3GeometryObject box, 
const TQ3BoxData *boxData);
TQ3Status Q3Box_EmptyData(TQ3BoxData *boxData);
TQ3Status Q3Box_GetOrigin(TQ3GeometryObject box, TQ3Point3D *origin);
TQ3Status Q3Box_SetOrigin(TQ3GeometryObject box, 
const TQ3Point3D *origin);
TQ3Status Q3Box_GetOrientation(TQ3GeometryObject box, 
TQ3Vector3D *orientation);
TQ3Status Q3Box_SetOrientation(TQ3GeometryObject box, 
const TQ3Vector3D *orientation);
TQ3Status Q3Box_GetMajorAxis(TQ3GeometryObject box, 
TQ3Vector3D *majorAxis);
TQ3Status Q3Box_SetMajorAxis(TQ3GeometryObject box, 
const TQ3Vector3D *majorAxis);
TQ3Status Q3Box_GetMinorAxis(TQ3GeometryObject box, 
TQ3Vector3D *minorAxis);
TQ3Status Q3Box_SetMinorAxis(TQ3GeometryObject box, 
const TQ3Vector3D *minorAxis);
TQ3Status Q3Box_GetFaceAttributeSet (
TQ3GeometryObject box, 
unsigned long faceIndex, 
TQ3AttributeSet *faceAttributeSet);
TQ3Status Q3Box_SetFaceAttributeSet (
TQ3GeometryObject box, 
unsigned long faceIndex, 
TQ3AttributeSet faceAttributeSet);

Creating and Editing Trigrids

TQ3GeometryObject Q3TriGrid_New (
const TQ3TriGridData *triGridData);
TQ3Status Q3TriGrid_Submit(const TQ3TriGridData *triGridData, 
TQ3ViewObject view);
TQ3Status Q3TriGrid_GetData(TQ3GeometryObject triGrid, 
TQ3TriGridData *triGridData);
TQ3Status Q3TriGrid_SetData(TQ3GeometryObject triGrid, 
const TQ3TriGridData *triGridData);
TQ3Status Q3TriGrid_EmptyData(TQ3TriGridData *triGridData);
TQ3Status Q3TriGrid_GetVertexPosition (
TQ3GeometryObject triGrid, 
unsigned long rowIndex, 
unsigned long columnIndex, 
TQ3Point3D *position);
TQ3Status Q3TriGrid_SetVertexPosition (
TQ3GeometryObject triGrid, 
unsigned long rowIndex, 
unsigned long columnIndex, 
const TQ3Point3D *position);
TQ3Status Q3TriGrid_GetVertexAttributeSet (
TQ3GeometryObject triGrid, 
unsigned long rowIndex, 
unsigned long columnIndex, 
TQ3AttributeSet *attributeSet);
TQ3Status Q3TriGrid_SetVertexAttributeSet (
TQ3GeometryObject triGrid, 
unsigned long rowIndex, 
unsigned long columnIndex, 
TQ3AttributeSet attributeSet);
TQ3Status Q3TriGrid_GetFacetAttributeSet (
TQ3GeometryObject triGrid, 
unsigned long faceIndex, 
TQ3AttributeSet *facetAttributeSet);
TQ3Status Q3TriGrid_SetFacetAttributeSet (
TQ3GeometryObject triGrid, 
unsigned long faceIndex, 
TQ3AttributeSet facetAttributeSet);

Creating and Editing Meshes

TQ3GeometryObject Q3Mesh_New(void);
TQ3MeshVertex Q3Mesh_VertexNew(TQ3GeometryObject mesh, 
const TQ3Vertex3D *vertex);
TQ3Status Q3Mesh_VertexDelete(TQ3GeometryObject mesh, TQ3MeshVertex vertex);
TQ3MeshFace Q3Mesh_FaceNew(TQ3GeometryObject mesh, 
unsigned long numVertices, 
const TQ3MeshVertex *vertices, 
TQ3AttributeSet attributeSet);
TQ3Status Q3Mesh_FaceDelete(TQ3GeometryObject mesh, TQ3MeshFace face);
TQ3Status Q3Mesh_DelayUpdates(TQ3GeometryObject mesh);
TQ3Status Q3Mesh_ResumeUpdates(TQ3GeometryObject mesh);
TQ3MeshContour Q3Mesh_FaceToContour (
TQ3GeometryObject mesh, 
TQ3MeshFace containerFace, 
TQ3MeshFace face);
TQ3MeshFace Q3Mesh_ContourToFace (
TQ3GeometryObject mesh, 
TQ3MeshContour contour);
TQ3Status Q3Mesh_GetNumComponents (
TQ3GeometryObject mesh, 
unsigned long *numComponents);
TQ3Status Q3Mesh_GetNumEdges(TQ3GeometryObject mesh, 
unsigned long *numEdges);
TQ3Status Q3Mesh_GetNumVertices (
TQ3GeometryObject mesh, 
unsigned long *numVertices);
TQ3Status Q3Mesh_GetNumFaces(TQ3GeometryObject mesh, 
unsigned long *numFaces);
TQ3Status Q3Mesh_GetNumCorners(TQ3GeometryObject mesh, 
unsigned long *numCorners);
TQ3Status Q3Mesh_GetOrientable(TQ3GeometryObject mesh, 
TQ3Boolean *orientable);
TQ3Status Q3Mesh_GetComponentNumVertices (
TQ3GeometryObject mesh, 
TQ3MeshComponent component, 
unsigned long *numVertices);
TQ3Status Q3Mesh_GetComponentNumEdges (
TQ3GeometryObject mesh, 
TQ3MeshComponent component, 
unsigned long *numEdges);
TQ3Status Q3Mesh_GetComponentBoundingBox (
TQ3GeometryObject mesh, 
TQ3MeshComponent component, 
TQ3BoundingBox *boundingBox);
TQ3Status Q3Mesh_GetComponentOrientable (
TQ3GeometryObject mesh, 
TQ3MeshComponent component, 
TQ3Boolean *orientable);
TQ3Status Q3Mesh_GetVertexCoordinates (
TQ3GeometryObject mesh, 
TQ3MeshVertex vertex, 
TQ3Point3D *coordinates);
TQ3Status Q3Mesh_SetVertexCoordinates (
TQ3GeometryObject mesh, 
TQ3MeshVertex vertex, 
const TQ3Point3D *coordinates);
TQ3Status Q3Mesh_GetVertexIndex (
TQ3GeometryObject mesh, 
TQ3MeshVertex vertex, 
unsigned long *index);
TQ3Status Q3Mesh_GetVertexOnBoundary (
TQ3GeometryObject mesh, 
TQ3MeshVertex vertex, 
TQ3Boolean *onBoundary);
TQ3Status Q3Mesh_GetVertexComponent (
TQ3GeometryObject mesh, 
TQ3MeshVertex vertex, 
TQ3MeshComponent *component);
TQ3Status Q3Mesh_GetVertexAttributeSet (
TQ3GeometryObject mesh, 
TQ3MeshVertex vertex, 
TQ3AttributeSet *attributeSet);
TQ3Status Q3Mesh_SetVertexAttributeSet (
TQ3GeometryObject mesh, 
TQ3MeshVertex vertex, 
TQ3AttributeSet attributeSet);
TQ3Status Q3Mesh_GetFaceNumVertices (
TQ3GeometryObject mesh, 
TQ3MeshFace face, 
unsigned long *numVertices);
TQ3Status Q3Mesh_GetFacePlaneEquation (
TQ3GeometryObject mesh, 
TQ3MeshFace face, 
TQ3PlaneEquation *planeEquation);
TQ3Status Q3Mesh_GetFaceNumContours (
TQ3GeometryObject mesh, 
TQ3MeshFace face, 
unsigned long *numContours);
TQ3Status Q3Mesh_GetFaceIndex(TQ3GeometryObject mesh, 
TQ3MeshFace face, 
unsigned long *index);
TQ3Status Q3Mesh_GetFaceComponent (
TQ3GeometryObject mesh, 
TQ3MeshFace face, 
TQ3MeshComponent *component);
TQ3Status Q3Mesh_GetFaceAttributeSet (
TQ3GeometryObject mesh, 
TQ3MeshFace face, 
TQ3AttributeSet *attributeSet);
TQ3Status Q3Mesh_SetFaceAttributeSet (
TQ3GeometryObject mesh, 
TQ3MeshFace face, 
TQ3AttributeSet attributeSet);
TQ3Status Q3Mesh_GetEdgeVertices (
TQ3GeometryObject mesh, 
TQ3MeshEdge edge, 
TQ3MeshVertex *vertex1, 
TQ3MeshVertex *vertex2);
TQ3Status Q3Mesh_GetEdgeFaces(TQ3GeometryObject mesh, 
TQ3MeshEdge edge, 
TQ3MeshFace *face1, 
TQ3MeshFace *face2);
TQ3Status Q3Mesh_GetEdgeOnBoundary (
TQ3GeometryObject mesh, 
TQ3MeshEdge edge, 
TQ3Boolean *onBoundary);
TQ3Status Q3Mesh_GetEdgeComponent (
TQ3GeometryObject mesh, 
TQ3MeshEdge edge, 
TQ3MeshComponent *component);
TQ3Status Q3Mesh_GetEdgeAttributeSet (
TQ3GeometryObject mesh, 
TQ3MeshEdge edge, 
TQ3AttributeSet *attributeSet);
TQ3Status Q3Mesh_SetEdgeAttributeSet (
TQ3GeometryObject mesh, 
TQ3MeshEdge edge, 
TQ3AttributeSet attributeSet);
TQ3Status Q3Mesh_GetContourFace (
TQ3GeometryObject mesh, 
TQ3MeshContour contour, 
TQ3MeshFace *face);
TQ3Status Q3Mesh_GetContourNumVertices (
TQ3GeometryObject mesh, 
TQ3MeshContour contour, 
unsigned long *numVertices);
TQ3Status Q3Mesh_GetCornerAttributeSet (
TQ3GeometryObject mesh, 
TQ3MeshVertex vertex, 
TQ3MeshFace face, 
TQ3AttributeSet *attributeSet);
TQ3Status Q3Mesh_SetCornerAttributeSet (
TQ3GeometryObject mesh, 
TQ3MeshVertex vertex, 
TQ3MeshFace face, 
TQ3AttributeSet attributeSet);

Traversing Mesh Components, Vertices, Faces, and Edges

TQ3MeshComponent Q3Mesh_FirstMeshComponent (
TQ3GeometryObject mesh, 
TQ3MeshIterator *iterator);
TQ3MeshComponent Q3Mesh_NextMeshComponent (
TQ3MeshIterator *iterator);
TQ3MeshVertex Q3Mesh_FirstComponentVertex (
TQ3MeshComponent component, 
TQ3MeshIterator *iterator);
TQ3MeshVertex Q3Mesh_NextComponentVertex (
TQ3MeshIterator *iterator);
TQ3MeshEdge Q3Mesh_FirstComponentEdge (
TQ3MeshComponent component, 
TQ3MeshIterator *iterator);
TQ3MeshEdge Q3Mesh_NextComponentEdge (
TQ3MeshIterator *iterator);
TQ3MeshVertex Q3Mesh_FirstMeshVertex (
TQ3GeometryObject mesh, 
TQ3MeshIterator *iterator);
TQ3MeshVertex Q3Mesh_NextMeshVertex (
TQ3MeshIterator *iterator);
TQ3MeshFace Q3Mesh_FirstMeshFace (
TQ3GeometryObject mesh, 
TQ3MeshIterator *iterator);
TQ3MeshFace Q3Mesh_NextMeshFace (
TQ3MeshIterator *iterator);
TQ3MeshEdge Q3Mesh_FirstMeshEdge (
TQ3GeometryObject mesh, 
TQ3MeshIterator *iterator);
TQ3MeshEdge Q3Mesh_NextMeshEdge(TQ3MeshIterator *iterator);
TQ3MeshEdge Q3Mesh_FirstVertexEdge (
TQ3MeshVertex vertex, 
TQ3MeshIterator *iterator);
TQ3MeshEdge Q3Mesh_NextVertexEdge (
TQ3MeshIterator *iterator);
TQ3MeshVertex Q3Mesh_FirstVertexVertex (
TQ3MeshVertex vertex, 
TQ3MeshIterator *iterator);
TQ3MeshVertex Q3Mesh_NextVertexVertex (
TQ3MeshIterator *iterator);
TQ3MeshFace Q3Mesh_FirstVertexFace (
TQ3MeshVertex vertex, 
TQ3MeshIterator *iterator);
TQ3MeshFace Q3Mesh_NextVertexFace (
TQ3MeshIterator *iterator);
TQ3MeshEdge Q3Mesh_FirstFaceEdge (
TQ3MeshFace face, 
TQ3MeshIterator *iterator);
TQ3MeshEdge Q3Mesh_NextFaceEdge (
TQ3MeshIterator *iterator);
TQ3MeshVertex Q3Mesh_FirstFaceVertex (
TQ3MeshFace face, TQ3MeshIterator *iterator);
TQ3MeshVertex Q3Mesh_NextFaceVertex (
TQ3MeshIterator *iterator);
TQ3MeshFace Q3Mesh_FirstFaceFace (
TQ3MeshFace face, 
TQ3MeshIterator *iterator);
TQ3MeshFace Q3Mesh_NextFaceFace (
TQ3MeshIterator *iterator);
TQ3MeshContour Q3Mesh_FirstFaceContour (
TQ3MeshFace face, TQ3MeshIterator *iterator);
TQ3MeshContour Q3Mesh_NextFaceContour (
TQ3MeshIterator *iterator);
TQ3MeshEdge Q3Mesh_FirstContourEdge (
TQ3MeshContour contour, 
TQ3MeshIterator *iterator);
TQ3MeshEdge Q3Mesh_NextContourEdge (
TQ3MeshIterator *iterator);
TQ3MeshVertex Q3Mesh_FirstContourVertex (
TQ3MeshContour contour, 
TQ3MeshIterator *iterator);
TQ3MeshVertex Q3Mesh_NextContourVertex (
TQ3MeshIterator *iterator);
TQ3MeshFace Q3Mesh_FirstContourFace (
TQ3MeshContour contour, 
TQ3MeshIterator *iterator);
TQ3MeshFace Q3Mesh_NextContourFace (
TQ3MeshIterator *iterator);
#define Q3ForEachMeshComponent(m,c,i)                    \
   for ( (c) = Q3Mesh_FirstMeshComponent((m),(i));       \
      (c);                                               \
      (c) = Q3Mesh_NextMeshComponent((i)) )
#define Q3ForEachComponentVertex(c,v,i)                  \
   for ( (v) = Q3Mesh_FirstComponentVertex((c),(i));     \
      (v);                                               \
      (v) = Q3Mesh_NextComponentVertex((i)) )
#define Q3ForEachComponentEdge(c,e,i)                    \
   for ( (e) = Q3Mesh_FirstComponentEdge((c),(i));       \
      (e);                                               \
      (e) = Q3Mesh_NextComponentEdge((i)) )
#define Q3ForEachMeshVertex(m,v,i)                       \
   for ( (v) = Q3Mesh_FirstMeshVertex((m),(i));          \
      (v);                                               \
      (v) = Q3Mesh_NextMeshVertex((i)) )
#define Q3ForEachMeshFace(m,f,i)                         \
   for ( (f) = Q3Mesh_FirstMeshFace((m),(i));            \
      (f);                                               \
      (f) = Q3Mesh_NextMeshFace((i)) )
#define Q3ForEachMeshEdge(m,e,i)                         \
   for ( (e) = Q3Mesh_FirstMeshEdge((m),(i));            \
      (e);                                               \
      (e) = Q3Mesh_NextMeshEdge((i)) )
#define Q3ForEachVertexEdge(v,e,i)                       \
   for ( (e) = Q3Mesh_FirstVertexEdge((v),(i));          \
      (e);                                               \
      (e) = Q3Mesh_NextVertexEdge((i)) )
#define Q3ForEachVertexVertex(v,n,i)                     \
   for ( (n) = Q3Mesh_FirstVertexVertex((v),(i));        \
      (n);                                               \
      (n) = Q3Mesh_NextVertexVertex((i)) )
#define Q3ForEachVertexFace(v,f,i)                       \
   for ( (f) = Q3Mesh_FirstVertexFace((v),(i));          \
      (f);                                               \
      (f) = Q3Mesh_NextVertexFace((i)) )
#define Q3ForEachFaceEdge(f,e,i)                         \
   for ( (e) = Q3Mesh_FirstFaceEdge((f),(i));            \
      (e);                                               \
      (e) = Q3Mesh_NextFaceEdge((i)) )
#define Q3ForEachFaceVertex(f,v,i)                       \
   for ( (v) = Q3Mesh_FirstFaceVertex((f),(i));          \
      (v);                                               \
      (v) = Q3Mesh_NextFaceVertex((i)) )
#define Q3ForEachFaceFace(f,n,i)                         \
   for ( (n) = Q3Mesh_FirstFaceFace((f),(i));            \
      (n);                                               \
      (n) = Q3Mesh_NextFaceFace((i)) )
#define Q3ForEachFaceContour(f,h,i)                      \
   for ( (h) = Q3Mesh_FirstFaceContour((f),(i));         \
      (h);                                               \
      (h) = Q3Mesh_NextFaceContour((i)) )
#define Q3ForEachContourEdge(h,e,i)                      \
   for ( (e) = Q3Mesh_FirstContourEdge((h),(i));         \
      (e);                                               \
      (e) = Q3Mesh_NextContourEdge((i)) )
#define Q3ForEachContourVertex(h,v,i)                    \
   for ( (v) = Q3Mesh_FirstContourVertex((h),(i));       \
      (v);                                               \
      (v) = Q3Mesh_NextContourVertex((i)) )
#define Q3ForEachContourFace(h,f,i)                      \
   for ( (f) = Q3Mesh_FirstContourFace((h),(i));         \
      (f);                                               \
      (f) = Q3Mesh_NextContourFace((i)) )

Creating and Editing NURB Curves

TQ3GeometryObject Q3NURBCurve_New (
const TQ3NURBCurveData *curveData);
TQ3Status Q3NURBCurve_Submit(const TQ3NURBCurveData *curveData, 
TQ3ViewObject view);
TQ3Status Q3NURBCurve_GetData(TQ3GeometryObject curve, 
TQ3NURBCurveData *nurbCurveData); 
TQ3Status Q3NURBCurve_SetData(TQ3GeometryObject curve, 
const TQ3NURBCurveData *nurbCurveData);
TQ3Status Q3NURBCurve_EmptyData (
TQ3NURBCurveData *nurbCurveData);
TQ3Status Q3NURBCurve_GetControlPoint (
TQ3GeometryObject curve, 
unsigned long pointIndex, 
TQ3RationalPoint4D *point4D);
TQ3Status Q3NURBCurve_SetControlPoint (
TQ3GeometryObject curve, 
unsigned long pointIndex, 
const TQ3RationalPoint4D *point4D);
TQ3Status Q3NURBCurve_GetKnot(TQ3GeometryObject curve, 
unsigned long knotIndex, 
float *knotValue);
TQ3Status Q3NURBCurve_SetKnot(TQ3GeometryObject curve, 
unsigned long knotIndex, 
float knotValue);

Creating and Editing NURB Patches

TQ3GeometryObject Q3NURBPatch_New (
const TQ3NURBPatchData *nurbPatchData);
TQ3Status Q3NURBPatch_Submit(const TQ3NURBPatchData *nurbPatchData, 
TQ3ViewObject view);
TQ3Status Q3NURBPatch_GetData(TQ3GeometryObject nurbPatch, 
TQ3NURBPatchData *nurbPatchData);
TQ3Status Q3NURBPatch_SetData(TQ3GeometryObject nurbPatch, 
const TQ3NURBPatchData *nurbPatchData);
TQ3Status Q3NURBPatch_EmptyData (
TQ3NURBPatchData *nurbPatchData);
TQ3Status Q3NURBPatch_GetControlPoint (
TQ3GeometryObject nurbPatch, 
unsigned long rowIndex, 
unsigned long columnIndex, 
TQ3RationalPoint4D *point4D);
TQ3Status Q3NURBPatch_SetControlPoint (
TQ3GeometryObject nurbPatch, 
unsigned long rowIndex, 
unsigned long columnIndex, 
const TQ3RationalPoint4D *point4D);
TQ3Status Q3NURBPatch_GetUKnot(TQ3GeometryObject nurbPatch, 
unsigned long knotIndex, 
float *knotValue);
TQ3Status Q3NURBPatch_SetUKnot(TQ3GeometryObject nurbPatch, 
unsigned long knotIndex, 
float knotValue);
TQ3Status Q3NURBPatch_GetVKnot(TQ3GeometryObject nurbPatch, 
unsigned long knotIndex, 
float *knotValue);
TQ3Status Q3NURBPatch_SetVKnot(TQ3GeometryObject nurbPatch, 
unsigned long knotIndex, 
float knotValue);

Creating and Editing Markers

TQ3GeometryObject Q3Marker_New(const TQ3MarkerData *markerData);
TQ3Status Q3Marker_Submit(const TQ3MarkerData *markerData, 
TQ3ViewObject view);
TQ3Status Q3Marker_GetData(TQ3GeometryObject marker, 
TQ3MarkerData *markerData);
TQ3Status Q3Marker_SetData(TQ3GeometryObject marker, 
const TQ3MarkerData *markerData);
TQ3Status Q3Marker_EmptyData(TQ3MarkerData *markerData);
TQ3Status Q3Marker_GetPosition(TQ3GeometryObject marker, 
TQ3Point3D *location);
TQ3Status Q3Marker_SetPosition(TQ3GeometryObject marker, 
const TQ3Point3D *location);
TQ3Status Q3Marker_GetXOffset(TQ3GeometryObject marker, long *xOffset);
TQ3Status Q3Marker_SetXOffset(TQ3GeometryObject marker, long xOffset);
TQ3Status Q3Marker_GetYOffset(TQ3GeometryObject marker, long *yOffset);
TQ3Status Q3Marker_SetYOffset(TQ3GeometryObject marker, long yOffset);
TQ3Status Q3Marker_GetBitmap(TQ3GeometryObject marker, TQ3Bitmap *bitmap);
TQ3Status Q3Marker_SetBitmap(TQ3GeometryObject marker, 
const TQ3Bitmap *bitmap);

Managing Bitmaps

TQ3Status Q3Bitmap_Empty(TQ3Bitmap *bitmap);
unsigned long Q3Bitmap_GetImageSize (
unsigned long width, unsigned long height);

Errors, Warnings, and Notices
kQ3ErrorDegenerateGeometry 
kQ3ErrorGeometryInsufficientNumberOfPoints 
kQ3ErrorVector3DNotUnitLength 
kQ3WarningQuaternionEntriesAreZero 
kQ3NoticeMeshVertexHasNoComponent 
kQ3NoticeMeshInvalidVertexFacePair 
kQ3NoticeMeshEdgeVertexDoNotCorrespond 
kQ3NoticeMeshEdgeIsNotBoundary 


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996